package com.itheima.bigevent.pojo;

import java.io.Serializable;
import java.util.Date;

import com.itheima.bigevent.anno.State;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

/**
 * @TableName article
 */
@Data
public class Article implements Serializable {
    private Integer id;

    @Pattern(regexp = "^\\S{1,10}$")
    @NotEmpty
    private String title;

    @NotEmpty
    private String content;

    @URL
    @NotEmpty
    private String coverImg;

    @State
    private String state;

    private Integer categoryId;

    private Integer createUser;

    private Date createTime;

    private Date updateTime;

    private Category Category;

    private static final long serialVersionUID = 1L;
}